if the memberNum of sprite getAt(ppl, 1) > 89 then
chkhitthrow(15)
chkhitthrow(16)
end if
else
if (advance = 12) and (the memberNum of sprite getAt(ppl, 1) > 89) then
chkhitthrow(15)
chkhitthrow(16)
else
if (advance = 13) or (advance = 14) then
chkhitlamp(4)
chkhit(getAt(ppl, 2), 87, 94, 2, 1, 137)
chkhit(getAt(ppl, 3), 116, 122, 3, 2, 138)
else
if advance = 15 then
chkhitlamp(4)
chkhit(getAt(ppl, 4), 271, 280, 4, 3, 294)
else
if (advance = 16) or (advance = 17) then
chkhitlamp(4)
chkhit(getAt(ppl, 4), 271, 280, 4, 3, 294)
chkhit(getAt(ppl, 3), 116, 122, 3, 2, 138)
end if
end if
end if
end if
end if
end if
end if
end if
end if
if the memberNum of sprite getAt(ppl, 1) > 89 then
set the member of sprite getAt(ppl, 1) to member(1, 2)
end if
end
on chkhit foecnl, boxplc, hit1, mnvplc, foeplc, ded
global ppl, mnv, foes, pwr, advance, fxpath
if (the memberNum of sprite getAt(ppl, 1) > 89) and (the memberNum of sprite foecnl <> ded) and (the castLibNum of sprite getAt(ppl, 1) = 2) then
o = the memberNum of sprite getAt(ppl, 1)
o = member(o, 2).name
set the loc of sprite 32 to the loc of sprite getAt(ppl, 1)
set the locV of sprite 32 to the locV of sprite 32 - 125
updateStage()
i = 1
repeat while i < 6
if sprite(getAt(ppl, 1)).flipH = 0 then
set the loc of sprite 32 to point(the locH of sprite 32 + value(item 1 of o), the locV of sprite 32 + value(item 2 of o))
else
set the loc of sprite 32 to point(the locH of sprite 32 - value(item 1 of o), the locV of sprite 32 + value(item 2 of o))
end if
updateStage()
if sprite 32 within foecnl then
i = 10
set the member of sprite foecnl to member(hit1 + 1, 1)
setAt(mnv, mnvplc, 15)
setAt(foes, foeplc, hit1 + 1)
setAt(pwr, mnvplc, getAt(pwr, mnvplc) - 20)
sound playFile 1, fxpath & "psy2.aif"
if getAt(pwr, mnvplc) < 0 then
set the member of sprite getAt(ppl, mnvplc) to member(ded, 1)
setAt(foes, foeplc, ded)
advance = advance + 1
advances()
end if
end if
i = i + 1
end repeat
else
if sprite getAt(ppl, 1) intersects foecnl and (getAt(foes, foeplc) < boxplc) and (abs(the locV of sprite getAt(ppl, 1) - the locV of sprite foecnl) < 24) and (sprite(getAt(ppl, 1)).flipH = sprite(foecnl).flipH) then
set the member of sprite foecnl to member(hit1, 1)
setAt(mnv, mnvplc, random(14) + 4)
setAt(foes, foeplc, hit1)
setAt(pwr, mnvplc, getAt(pwr, mnvplc) - 5)
sound playFile 1, fxpath & "psy1.aif"
else
if sprite getAt(ppl, 1) intersects foecnl and (getAt(foes, foeplc) = hit1) and (sprite(getAt(ppl, 1)).flipH = sprite(foecnl).flipH) then
set the member of sprite foecnl to member(hit1 + 1, 1)
setAt(mnv, mnvplc, 15)
setAt(foes, foeplc, hit1 + 1)
setAt(pwr, mnvplc, getAt(pwr, mnvplc) - 10)
if random(2) = 1 then
sound playFile 2, fxpath & 263 + random(5)
else
sound playFile 1, fxpath & "psy2.aif"
end if
if getAt(pwr, mnvplc) < 0 then
set the member of sprite getAt(ppl, mnvplc) to member(ded, 1)
setAt(foes, foeplc, ded)
advance = advance + 1
advances()
end if
end if
end if
end if
end
on advances
global advance, foes, ppl, pwr, fxpath
if advance = 2 then
set the member of sprite getAt(ppl, 3) to member(getAt(foes, 2), 1)
set the member of sprite getAt(ppl, 4) to member(getAt(foes, 3), 1)
else
if advance = 4 then
setAt(foes, 1, 43)
setAt(pwr, 2, 50)
else
if advance = 5 then
sprite(30).visible = 1
sound playFile 1, fxpath & "go1.aif"
else
if advance = 8 then
sprite(41).visible = 1
sound playFile 1, fxpath & "go1.aif"
else
if advance = 12 then
sprite(41).visible = 1
sound playFile 1, fxpath & "go1.aif"
else
if advance = 16 then
setAt(foes, 2, 103)
setAt(pwr, 3, 50)
setAt(foes, 3, 262)
setAt(pwr, 4, 50)
else
if advance = 18 then
sprite(41).visible = 1
sound playFile 1, fxpath & "go1.aif"
end if
end if
end if
end if
end if
end if
end if
end
on chkhitthrow foecnl
global ppl, fxpath
if the memberNum of sprite foecnl <> 258 then
o = the memberNum of sprite getAt(ppl, 1)
o = member(o, 2).name
set the loc of sprite 32 to the loc of sprite getAt(ppl, 1)
updateStage()
i = 1
repeat while i < 6
if sprite(getAt(ppl, 1)).flipH = 0 then
set the loc of sprite 32 to point(the locH of sprite 32 + value(item 1 of o), the locV of sprite 32 + value(item 2 of o))
else
set the loc of sprite 32 to point(the locH of sprite 32 - value(item 1 of o), the locV of sprite 32 + value(item 2 of o))
end if
updateStage()
if sprite 32 intersects foecnl then
i = 10
set the member of sprite foecnl to member(258)
set the locV of sprite foecnl to the locV of sprite foecnl - 40
sound playFile 1, fxpath & "psy2.aif"
end if
i = i + 1
end repeat
end if
end
on chkhitlamp lmpsprt
global ppl, shandlir, fxpath
if (the memberNum of sprite lmpsprt = 302) and (shandlir = 0) then
o = the memberNum of sprite getAt(ppl, 1)
o = member(o, 2).name
set the loc of sprite 32 to the loc of sprite getAt(ppl, 1)
updateStage()
i = 1
repeat while i < 6
if sprite(getAt(ppl, 1)).flipH = 0 then
set the loc of sprite 32 to point(the locH of sprite 32 + value(item 1 of o), the locV of sprite 32 + value(item 2 of o))
else
set the loc of sprite 32 to point(the locH of sprite 32 - value(item 1 of o), the locV of sprite 32 + value(item 2 of o))
end if
updateStage()
if sprite 32 intersects lmpsprt then
i = 10
puppetSprite(lmpsprt, 1)
shandlir = 10
set the locV of sprite lmpsprt to the locV of sprite lmpsprt + 40
set the locH of sprite lmpsprt to the locH of sprite lmpsprt - 10